# handle restart of game
# for now just restart session and redirect to starting page
from google.appengine.ext import webapp
from util.sessions import Session


class RestartHandler(webapp.RequestHandler):
    
    def get(self):
            self.session = Session()    # find or create the session
            
            cur_keys = self.session.session.keys()
            
            # delete all keys from session
            for key in cur_keys:
                self.session.delete_item(key)
            
            # redirect to starting node (home page)
            self.redirect(r'/')
